<div class="verticalmenu">
<ul>
<li><a href="index.php?<?php echo (SID?SID:"") ?>"><?php echo $lang['menu_homepage'] ?></a></li>
<?php if (@$_SESSION['auth']['id']) {echo '<li><a href="index.php?page=logout&'.(SID?SID:"").'">'.$lang['menu_logout'].'</a></li>';} 
else { echo'<li><a href="index.php?page=login&'.(SID?SID:"").'">'.$lang['menu_login'].'</a></li>';}; ?>
<li><a href="index.php?page=register&<?php echo (SID?SID:"")  ?>"><?php echo $lang['menu_register'] ?></a></li>
<hr width="140">
<?php
$cat_query=dibi::query("SELECT * FROM `categories`");
$cat_rows=count($cat_query);
if($cat_rows) {
foreach($cat_query as $cats)
{
echo '<li><a href="?page=cat&id='.$cats['id'].'&'.(SID?SID:"").'">'.$cats['name'].'</a></li>';
};
};
?>
</ul>
</div>
</div>
<div id="content">   